// @ts-ignore

 
import { api } from '@/utils/api';

/** 获取设备-点检记录数据 POST /equInspectionRecord/get */
export async function equInspectionRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultEquInspectionRecordEntity>;

export async function equInspectionRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultEquInspectionRecordEntity>>;

export async function equInspectionRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultEquInspectionRecordEntity>;

export async function equInspectionRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultEquInspectionRecordEntity>(`/app/equInspectionRecord/get`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultEquInspectionRecordEntity>(`/app/equInspectionRecord/get`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 检查 POST /equInspectionRecord/handle */
export async function equInspectionRecordHandle(
  body: BIZAPI.EquInspectionRecordHandleReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function equInspectionRecordHandle(
  body: BIZAPI.EquInspectionRecordHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function equInspectionRecordHandle(
  body: BIZAPI.EquInspectionRecordHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function equInspectionRecordHandle(
  body: BIZAPI.EquInspectionRecordHandleReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/equInspectionRecord/handle`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultObject>(`/app/equInspectionRecord/handle`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取设备-点检记录分页数据 POST /equInspectionRecord/page */
export async function equInspectionRecordPage(
  body: BIZAPI.EquInspectionRecordQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageEquInspectionRecordEntity>;

export async function equInspectionRecordPage(
  body: BIZAPI.EquInspectionRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageEquInspectionRecordEntity>>;

export async function equInspectionRecordPage(
  body: BIZAPI.EquInspectionRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageEquInspectionRecordEntity>;

export async function equInspectionRecordPage(
  body: BIZAPI.EquInspectionRecordQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageEquInspectionRecordEntity>(`/app/equInspectionRecord/page`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultIPageEquInspectionRecordEntity>(`/app/equInspectionRecord/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 统计 POST /equInspectionRecord/statistics */
export async function equInspectionRecordStatistics(
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultEquInspectionRecordStatisticsResp>;

export async function equInspectionRecordStatistics(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultEquInspectionRecordStatisticsResp>>;

export async function equInspectionRecordStatistics(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultEquInspectionRecordStatisticsResp>;

export async function equInspectionRecordStatistics(options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultEquInspectionRecordStatisticsResp>(
      `/app/equInspectionRecord/statistics`,
      {
        method: 'POST',
        ...(options || {}),
        tupleResponse: true
      }
    );
  }

  return api<BIZAPI.IResultEquInspectionRecordStatisticsResp>(
    `/app/equInspectionRecord/statistics`,
    {
      method: 'POST',
      ...(options || {})
    }
  );
}
